Get more Cocoa plugin mouse event stuff working, based largely on a patch from Markus Stange.