Restore compatibility with Qt4.7