export.js: Export in all CommonJS environments

Closes #521
Use `log`, not `console.log`.