Fix startup crash with Mongoid wrapper.