Change node/browser check to use window object

We can't rely on global because browserify creates it
Release 0.1.5