fixes #505 added JSON_PRETTY_PRINT for php >= 5.4.0

added php version check and JSON_PRETTY_PRINT option
This must end in a fullstop.