fixes #505 added JSON_PRETTY_PRINT for php >= 5.4.0

added php version check and JSON_PRETTY_PRINT option
Ok, agreed on that. Though the version compare seemed to be the safest way to determine if I could use pretty print parameter for json_encode. I've checked that the constant is not defined until 5.4.x, so it's safe to use a defined() check.