Refactor Node.js detection in parser.js to fix an issue when global.window has been set.

Node.js detection fails if any node modules define `global.window`.

I ran into this issue when trying to use [wheat](https://github.com/creationix/wheat) and LESS in node. This code currently throws an exception in 1.3.3:

```javascript
var wheat = require('wheat'),
    less = require('less');
```

This happens because Wheat uses a version of Google Prettify that defines `global.window` which throws off the current Node.js detection in `parser.js`.