Portable for commonjs and browser