Necessary changes to be compilable on MS Windows.