Fix build for mongoid