use $image->getUrlGenerator()

@Wikia/platform-team 
https://wikia-inc.atlassian.net/browse/PLATFORM-634

Both `File` and  `GlobalFile` have a `getUrlGenerator` function, so let's use that to patch this fatal.
There's no guarantee that the object passed in via `$image` has a `getUrlGenerator` function.