export.js: Export in all CommonJS environments

Closes #521
The IIFE already existed before this PR.