Fix bug 542: fix detection of compiler version on systems without the head command.
Fix bug 542: fix detection of compiler version on systems without the head command.

pasuka/eigen,ROCmSoftwarePlatform/hipeigen,TSC21/Eigen,ritsu1228/eigen,toastedcrumpets/eigen,Zefz/eigen,ROCmSoftwarePlatform/hipeigen,pasuka/eigen,Zefz/eigen,toastedcrumpets/eigen,Zefz/eigen,Zefz/eigen,ritsu1228/eigen,ROCmSoftwarePlatform/hipeigen,TSC21/Eigen,pasuka/eigen,pasuka/eigen,ROCmSoftwarePlatform/hipeigen,toastedcrumpets/eigen,TSC21/Eigen,ritsu1228/eigen,TSC21/Eigen,ritsu1228/eigen,toastedcrumpets/eigen,ritsu1228/eigen,pasuka/eigen