Fix compatibility with Qt 4.8.