I'm afraid the logic for the button sensor is in the tray itself (most everything besides the IDE I/F usually is).
The only feasible way I see is a HW/SW combination: use some unused data line (parallel, serial, joystick port, secondary mouse button, ...) to hook up a button and write a small prog to monitor that line and issue an eject command when necessary.
Another option is to run a flexibel cable from the tray to the back of the drive, but that's probably hard to do in the first place and might become a source of trouble later on.