title: Node.js process.domain is undefined sometimes
body: <p>In Node.js project build with LoopbackJS I need to store data during request. </p>
  
  <p>So I used <a href="http://nodejs.org/api/domain.html" rel="noreferrer">domain</a> feature:</p>
  
  <pre><code>// pre-processing middleware
  app.use(function (req, res, next) {
    // create per request domain instance
    var domain = require('domain').create();
  
    // save request and response to domain, to make it accessible everywhere
    domain.req = req;
    domain.res = res;
    domain.run(next);
  });
  </code></pre>
  
  <p>Later in required module:</p>
  
  <pre><code>Model.beforeRemote('**', function(oContext, oModel, next) {
      // Save method name for later use
      process.domain.remoteContext = {          /* Here is an error thrown */
        methodName: oContext.method.name
      };
      ...
      process.domain.res.send() // example of usage
  })
  </code></pre>
  
  <p>BUT when I make request from Safari or IE, process.domain is sometimes undefined! Requesting from Chrome or Firefox works as expected. Any suggestions?</p>
  
  <p>Error response:</p>
  
  <pre><code>{"error":{"name":"TypeError","status":500,"message":"Cannot set property 'remoteContext' of undefined","stack":"TypeError: Cannot set property 'remoteContext' of undefined\n    at module.exports (/Users/igormatyushkin/projects/Yash/server/hooks/admin-remote.js:12:34)\n    at Function.Model.setup.ModelCtor.beforeRemote.args (/Users/igormatyushkin/projects/Yash/node_modules/loopback/lib/model.js:184:9)\n    at execStack (/Users/igormatyushkin/projects/Yash/node_modules/loopback/node_modules/strong-remoting/lib/remote-objects.js:363:13)\n    at RemoteObjects.execHooks (/Users/igormatyushkin/projects/Yash/node_modules/loopback/node_modules/strong-remoting/lib/remote-objects.js:372:10)\n    at RemoteObjects.invokeMethodInContext (/Users/igormatyushkin/projects/Yash/node_modules/loopback/node_modules/strong-remoting/lib/remote-objects.js:512:8)\n    at async.series.results (/Users/igormatyushkin/projects/Yash/node_modules/loopback/node_modules/strong-remoting/node_modules/async/lib/async.js:610:21)\n    at _asyncMap (/Users/igormatyushkin/projects/Yash/node_modules/loopback/node_modules/strong-remoting/node_modules/async/lib/async.js:249:17)\n    at async.eachSeries.iterate (/Users/igormatyushkin/projects/Yash/node_modules/loopback/node_modules/strong-remoting/node_modules/async/lib/async.js:149:13)\n    at async.eachSeries (/Users/igormatyushkin/projects/Yash/node_modules/loopback/node_modules/strong-remoting/node_modules/async/lib/async.js:165:9)\n    at _asyncMap (/Users/igormatyushkin/projects/Yash/node_modules/loopback/node_modules/strong-remoting/node_modules/async/lib/async.js:248:13)"}}
  </code></pre>