Added a check to see if JSON_PRETTY_PRINT is available
(which it is on php 5.4 and forward)