fix Qt 5 build on Mac/Win