Compat 52

hi, seems like majority of Fluentd+PHP users are suffered from using PHP 5.2 or older. Could you apply this branch to master?