Update to framework.php to check version before using log-json

Found ```Fatal error:  Call to undefined method PHPUnit_Framework_TestSuite::hasOutput()``` when using ```--log-json``` with phpbb.

It can occur when a framework uses its own phpunit that is older than 4.0.
https://github.com/sebastianbergmann/phpunit/blob/4.0/src/Util/Log/JSON.php#L251

This fix adds a version check for phpunit before appending log-json