Added bin2hex() implementation for old PHP versions