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.

This fix adds a version check for phpunit before appending log-json