Fixed check for IPv6 support.

The `hasattr` check doesn't make any sense according to the docs: http://docs.python.org/2/library/socket.html#socket.has_ipv6

Was added by @t-8ch in b794413042e8b2ab8ca362b2c8ebd6b8aa5bb9e9