fix more c++ compile errors