Fix Hex decoder to work on PHP < 5.4.0 where hex2bin() is unavailable.