Fix some test failures on MongoDB 1.8