Patch to add PlatformWindows, based on Carlo Kok's version from the Windows branch.