Fix build for Windows.

https://github.com/mono/mono/commit/2b638808bf4e24c8f46643038fed8cb95ff46045
https://github.com/mono/mono/commit/0cc9d6ecd008356906bb356147053d1cef887277