Fix Qt 5.0 compatibility