Fixed Bug #66893i imagescale ignore method argument

We also have our goto fail; bug.

Upstream fix for libgd
https://bitbucket.org/libgd/gd-libgd/commits/5b42b1178c37ffd30c9a15733058656be0277da0