Mongoid 4 compatibility fix.
Merge pull request #80 from slainer68/mongoid4-fix

Mongoid 4 compatibility fix