Fix compatibility with Browserify

You can't depend on `this` being a reference to `window`. For example, in Browserify, `this` refers to `module.exports`.  This had been corrected previously (#108).