added support for mongoid 4