(#1021) use browserify to insert globals

instead of specifying the globals, we use browserify to add them, probobly breaks stuff, will test tomorow