Extend if mongoid is defined