Fix crash on windows build with Wine.