Fix compilation issues assigning NULL to bson_type