Rewrite qmake detection to better support Qt5 - plugins