export.js: Exporting in all CommonJS environments

Closes #521