Register as AMD module and expose in Node module.exports (fixes #154).