Fix bug is client use PHP < 5.3
Compatibility small fixes