Serializer implementation for MongoID