Add support for Mongoid >= 3.1.0