Fix EZP-21913: errors in bin/php scripts using ezpublish:legacy:script