Tests: update scripts for Travis CI

Fix build with Qt5 and Clang >= 3.4.