Fixes issue #464 by adding mouseout handler to document

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