Fixed EZP-20699: Running ezcache with purge in symfony cli genates a php fatal error

This Pull Request fixes the problem that the use of the `global` keyword does not enable access to the direct parent namespace in the call stack. Since `bin/php/ezcache.php` uses the `global` keyword, it doesn't work from inside a closure which is used by `php ezpublish/console ezpublish:legacy:script`.