Little fix for Mongoid 4

This hack is not really clean, but seems to work.