Also fix the build for Qt5 without private headers.

That shouldn't happen, but it looks like for some of the cross-builds
our detection of the availability of private headers doesn't work.