Add UMD support

Little PR to add support for AMD, CommonJS, and attaching to globals.