Add support for Mongoid 4

Signed-off-by: Aymeric Brisse <aymeric.brisse@perfect-memory.com>