Fix build of projectbuilders on MSVC.
Fix build of custom-definesandincludes on MSVC.
Reintroduce kdewin library in a few places that still use POSIXisms.

We should port away from kdewin as soon as possible, but for now I just
wanted to get the code to build...