Fix unit tests with latest PHP versions

This fixes the build with latest PHP 5.4 and 5.5