Fix shell crash for stable MongoDB with Clang