Fixed stripping hostname in DNS::ResolveIP

ported from SP3