Compatibility fix for MongoDB 2.4