Improve detection of ImageMagick