You could pull apart your speedo and find the part of the circuit where it converts the mechanical signal to an electric signal and wire your speedo wires in their. Usually mechanical speedos use a phototransistor and a chopping wheel to convert it to an electronic signal. It would take a bit of mucking around but I reckon it could be done. Of course your new speedo may put out a different number of pulses than what the old one did so it may not be claibrated very well.
The other option is to pull apart the speedo sensor in the new gearbox and see if you can make the old mechanical one fit instead.