If you've got access to a MIG welder, carefully weld a nut to the end of the broken bolt/stud through the hole in the nut (this will work even if it's sheared off flush with the surface). The heat should help to break the bond with the gearbox casing & you can then get a socket on the nut to undo it.
I've used this tried & tested method successfully many times.