Fix build against Qt 5.11 (missing includes)
More fixes from 16691987f that seem to have got lost during merge.