Changes I had to make to get this to build on windows.