Added json pretty print support for PHP versions older than 5.4.