Support older versions of MongoEngine