fix getaddrinfo crash on OS X