Fix incompatibility with MongoDB 2.6