Add AMD/Node JS module support

Closes #5