fix build failure with unpatched Qt >= 5.3

This was originally reported as https://bugs.debian.org/763216