make register.js loadable on NodeJS, fixes #148