Another fix for the update function in the MongoDB backend (for MongoDB >= 2.6 compatibility)