makefile: autoselect correct g++ version