(bug 5559) Improve detection of ImageMagick [patch: Greg Turnquist]