Fix to make write_mongodb work with any version of mongo-c-driver