Expose as AMD module if AMD-loader is present

This is the same approach used by jQuery to make this usable in 
AMD-loaders like requirejs.
Merge pull request #5 from banderson/master

Expose as an AMD module if AMD loader (like requireJS) is present