Fix compilation with Qt 4.7 (issue #371)