Support node as a JavaScript engine

The main issue with node.js is that the global object is not exposed via
`this` but via `global`. To make this work `ScalaJS.g` is rewired in the
`exports.js` file to work in optimized mode.