Fixing json_encode support for php 5.3