Fix compilation on windows for ipv6 code

Fixes compilation and linking on win32/win64.