be smarter about setting CC/CXX on linux machines

[skip ci]