Use window for browserify to work