compat: backport hex_to_bin first introduced in v2.6.35