Added more conditions for checking Qt versions. Tested on Debian Wheezy.