Fix module.exports for Browserify

The global is not window in Browserify. So use local assignKey to define the export.