title: Cannot read property 'ObjectID' of undefined
body: <p>I am forking / try to understand <a href="https://www.npmjs.com/package/mongodb-rest" rel="nofollow">mongodb-rest</a> project. When I am running only the <code>rest.js</code> script I get this error:</p>
  
  <pre><code>TypeError: Cannot read property 'ObjectID' of undefined
      at app.post.connection.connect.res.status.json.message (/var/lib/openshift/5556b4c4fcf9336abf0000de/app-root/runtime/repo/server.js:99:32)
  </code></pre>
  
  <p>at this line, when I try to handle <code>PUT</code> message:</p>
  
  <pre><code>var spec = {'_id': new BSON.ObjectID(req.params.id)};
  </code></pre>
  
  <p>I have the same 'include' lines as <code>rest.js</code></p>
  
  <pre><code>  var mongodb = require("mongodb");
    var BSON = mongodb.BSONPure;
  </code></pre>
  
  <p>but running on <code>OpenShift</code> servers.</p>
  
  <p>Any idea what is wrong?</p>
  
  <h1>UPDATE</h1>
  
  <p>I tried to use same package:</p>
  
  <pre><code>  var bson = require("bson");
    var BSON = bson.BSONPure.BSON;
    //var BSON = mongodb.BSONPure;
  </code></pre>
  
  <p>got same error</p>