travis: add support for $CXX building and fix Qt4/Qt5 support