support for mongoid ~> 3.1.0