Make IPV6 hexstring conversion code endian-aware