code: function patchRequire(require) {
          if (require.patched) {
              return require;
          }
          function casperBuiltinPath(path) {
              var absPath = fs.pathJoin(phantom.casperPath, 'modules', path + '.js');
              return fs.isFile(absPath) ? absPath : undefined;
          }
          function localModulePath(path) {
              var baseDir = phantom.casperScriptBaseDir || fs.workingDirectory;
              var paths = [
                  fs.absolute(fs.pathJoin(baseDir, path)),
                  fs.absolute(fs.pathJoin(baseDir, path + '.js'))
              ];
              return paths.filter(function(path) {
                  return fs.isFile(path);
              }).pop();
          }
          var patchedRequire = function patchedRequire(path) {
              var moduleFilePath = casperBuiltinPath(path);
              if (moduleFilePath) {
                  return require(moduleFilePath);
              }
              moduleFilePath = localModulePath(path);
              if (moduleFilePath) {
                  return require(moduleFilePath);
              }
              try {
                  return require(path);
              } catch (e) {
                  throw new CasperError("Can't find module " + path);
              }
          };
          patchedRequire.cache = require.cache;
          patchedRequire.extensions = require.extensions;
          patchedRequire.stubs = require.stubs;
          patchedRequire.patched = true;
          return patchedRequire;
      }
docs: Patched require to allow loading of native casperjs modules.
  Every casperjs module have to first call this function in order to
  load a native casperjs module:
  
  var require = patchRequire(require);
  var utils = require('utils');
  
  Useless for SlimerJS