Fix getaddrinfo emulation for systems with struct sockaddr.sa_len.