get g++ build to correctly work on OSX with qmake flag