Fixed whitespace part of bug #64874 ("json_decode handles whitespace and case-sensitivity incorrectly")

This is the backwards-compatible half of https://github.com/php/php-src/pull/436 and, as such, is a pull request aimed at the PHP-5.4 branch.