Support for mongoid >= 3.0