Added support for commonjs, AMD and browser globals using UMD pattern