Check with a salvage yard or Ebay for a used gearbox, they go for about $20 to $30. They're somewhat scarce so you may have to beat the bushes.
Remove the cover to make sure the donor gearbox has good gears. The gearboxes and internal nylon gears are unique right & left and cannot be interchanged, but you can swap left to left & right to right with a driver or passenger seat. You can only use an e32 or e34 gearbox.
More info at this link:
http://www.nmia.com/~dgnrg/page_32.htm