Fix IPv6 socket creation.