fix for old versions of mongo client