Fix EZP-21847 fatal error in ezpublish:legacy:script command if ezxFormToken isn't found


JIRA: https://jira.ez.no/browse/EZP-21847

if the ezxFormToken is not present in the legacy extension autoloads, running any script through ezpublish:legacy:script command will fail with a fatal error.

This makes it impossible to run the ezpgenerateautoloads script through this command (in order to fix the problem).

This commit checks if the class has been loaded before attempting to use it's static methods.