export.js: Export in all CommonJS environments

Closes #521
Let's not do this... I don't mind a few more lines.

Also why do we need to access `QUnit.QUnit` here?