Add AMD support, and test no-module loading

Closes #27
Closes #26