Handle broken JSON properly (sometimes happens on Apache)