qmake: avoid linking to unused libraries