Fixes issue #464 by adding mouseout handler to document

This should fix the issue #464, basically we listen for mouseout on the document and then trigger standard mouseup handling.