Add a package.json file and update to use 'window' instead of this to support browserify