Adapt to php-5.3.x bug in decoding json