Get it to build with modern GNU Autotools and ImageMagick