Don't require rack/mongoid. It was removed with IdentityMap (7180173).

Fix #3367.