updated UMD wrapper for compatability with modular commonjs components