export.js: Export in all CommonJS environments

Closes #521
Let's extract these into a grunt task or separate script so that developers working on QUnit can use this to install ringo and rhino locally as well. I copied them manually and ran into an issue...