CXX-311

This includes two commits, one to apply SERVER-14378, and another to fix it for old mongoDB versions.