Compatibility with Mongoid 4