Make use of IO::Socket::INET6 optional

IPv6 support should not be required, but used when available. Check if
the module can be loaded and load it only if it's available.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>