Just check/use window object under browserify.

See: https://github.com/substack/browser-pack/issues/25#issuecomment-31278911