Add UMD wrapper, fixes #27

This works in the browser and for AMD. I haven't tested in Node.

If it works fine, I'll squash commits later today