Fix retrieval of compiler name in case of extra dashes

Compiler string can contain dashes, for example ```eabi-gcc3```