Avoid warning casts

Fix for https://github.com/mongodb/mongo-c-driver/pull/47