Fix server rendering

Refering to window doesn't work when using it with node. Setting it to global works on the server AND the browser, since browserify makes it a reference to window.