using defined? instead of explicit version to allow mongoid 4 to work

It's not much, but it made mongoid 4 work for me, it was this or mongoid3? || mongoid4? I felt this more future proof.