correctly differentiating between node.js, node-webkit and the browser
Merge pull request #39 from FunkMonkey/master

correctly differentiating between node.js, node-webkit and the browser