Fixes to run at old PHP versions
Merge pull request #1 from guilhermefarias/master

Fixes to run at old PHP versions