Fix crashes on Node (from stringifying invalid ObjectIds, and from no document global)

We at [Zaption](http://www.zaption.com) have been using ObjectId.js on Node. It works pretty well, but had a few persistent crashes (which are annoying on Node because they down the entire process). We fixed them a while back, but I thought it'd be good to contribute them back to the source.

* Fix crash when stringifying an invalid ObjectId (returns ```Invalid ObjectId``` instead, similar behavior to the JS Date object when stringifying an invalid Date)
* Works without a ```document``` global, which Node doesn't have, by faking it