Fix compilation errors over Qt4