Minor changes for compatibility among different platforms/Qt versions