Fix json error handling for PHP <5.3.3
Merge pull request #12 from colinmollenhour/fix-php532

Fix json error handling for PHP <5.3.3