export.js: Export for all CommonJS environments

Closes #521