Fixed compatibility with Mongoid 4.x.
Merge pull request #146 from dblock/mongoid-4x

Fixed compatibility with Mongoid 4.x.