Replace hex2bin with pack in tests as PHP 5.3 does not have hex2bin. This allows tests to pass.