DRY up ObjectID.prototype.generate