Fix test compatibility for PHP 5.4
fix build warnings, unused variables
Merge pull request #249 from remicollet/issue-v100

Minor fix for v 1.0.0