added php version check before use of php 5.4 constants
Merge pull request #1 from radmar/master

Notice: Use of undefined constant JSON_PRETTY_PRINT - assumed 'JSON_PRETTY_PRINT'