use BSONType from mongo/bson/bsontypes.h which contains MinKey and MaxKey instead of bson_type from bson.h