Change context to window

Problem in CommonJS (Browserify).