dont assume require is defined when setting up cjs loader

Was running into an `require is not defined` error when trying to use [this](https://github.com/systemjs/systemjs/blob/master/dist/system.js). This seems to be a sensible fix and all the tests pass.