Fix incorrect getaddrinfo() usage (fix #199).