Fix compilation with Qt < 4.8.5.