fix build errors with qt5