packet: Fix ipv6.hdr() with string payload

Previously, a string payload would cause an exception.