Feature node js detection fix

I ran into an instance where `process` got defined for some reason and so this updated the NodeJS check to use `exports` as well as checks that there is not a `window` either.

Not really sure what is the most preferred way to check, but got some inspiration from Underscore:
http://underscorejs.org/docs/underscore.html#section-10