use window instead of this so that we can browserify this module

I am using this to polyfill older browsers, but since common.js and browserify wrap a closure around modules, ```this !== window```

Changed this to window.