Fixes to run properly on Windows under Qt 5.1