Allow purescript-mocha to work in node.js as well as browser

Tested by running the tests for purescript-timers in node.js and via karma (see my pr there).