Fixed compiler name check on Linux

- Default compiler name on most distros is c++
- Check for the flag "CMAKE_COMPILER_IS_GNUCXX instead