autotools: Check for incompatible ImageMagick