Qt4: Fixes an FTBFS on Gentoo x86_64 when USE_QTMIMETYPES=On

This happens when QTMIMETYPES_LIBRARY_DIRS are different from the
QT_LIBRARY_DIR.

Reported-by: Harvey Mittens https://github.com/Teknocrat