Conversion to UMD

Allow plugin to be used as AMD, CommonJS, or as browser global. More info here: https://github.com/umdjs/umd