Fix Qt4 compatibility