Allow require() to be overridden for browserify support