Changes to allow building on Windows