CXX-241 use --dbg flag to control optimization