Defining 'window' globally to avoid browserify errors