Use unhexify for python 3 compatibility

Cherry picked from #91.