Fix Mongo deprecation warnings.