PYTHON-697 - Fix upsert _id backward compatibility