Updated bodge to at least attempt to work in cases where global 'require' is in use (by requirejs, for instance)