cmake: fix Windows build with IPv6 support

Patch-by: "Z98"