graphicsmagick: sync with imagemagick formula.

Fixes #22676.