Browserify Support

Checks for `module` before `window` for browserify support.