Check node environment by window instead of module.

Currently randy does not work in browserify as it checks for `module`, which browserify provided.

A bit of background: I'm writing a module that will be ran in both serverside and clientside. Browserify is the most obvious choice.