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/457 and, as such, is a pull request aimed at PHP 5.4 and PHP 5.5. See the main request for more info.