Fix Qt 4.8 compile issues