Added amd support (2 lines)

Added support for loading as AMD module using requirejs.

The additional code required is minimal, and lots of people (including myself) use AMD modules.

This would take care of #72 and #70