Fix: Check g++ version before compiling 'hello.cxx' test

Fixes #557