Fix module.exports for Browserify

The global is not window in Browserify. So use local assignKey to define the export.
Merge pull request #114 from epeli/master

Fix module.exports for Browserify