Prevent crashes when a C++ toolchain is used instead of a C toolchain.