Pass the HAVE_QT* flags through the config header, like all others.

I don't know why it didn't work for the original author, but it definitely
works now.
Merge pull request #1029 from SpecLad:have-qt-config