EZP-21913: Fixed globals for critical scripts

https://jira.ez.no/browse/EZP-21913

Fixed globals for scripts: 

* updateniceurls.php
* runcronjobs.php
* ezasynchronouspublisher.php
* ezsubtreecopy.php