Added support for Mongoid 4.x.