fix for older versions of php