Added patches to work on Windows.