Upgrade to support newer pymongo versions.