Allow overriding the default variables for ImageHelper::resize()

This is needed if plugins want to use a different path, etc.

Will introduce BC break for E_STRICT users, but should work normally otherwise.