Added some magic to automatically decide if we use Qt5 or not.