Fix parsing of numeric hosts in gethostbyname_r