Fix server rendering by renaming window to global.

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.