Change browser/nodeJS detection to work with Node-Webkit

Instead of detecting if `window` exists, check if `module.exports` exists.
Fix module checking to pass JS Lint
Fix statement to detect module.exports
Fix browser test
Detect if `process` is defined
Improve test - because setting `global.process` is not needed
Be consistent and use `process` instead of `global.process`
Check that `global` and `global.process` both exist.
Merge pull request #247 from stayradiated/master

Change Browser/NodeJS detection to look for global.process instead of window. Allows working in Node-Webkit