Fixed PHP-1096: PHP crashes due to null pointer dereference on shutdown when JSON extension is not present