More Windows related fixes.

Signed-off-by: Niko Rosvall <niko@ideabyte.net>