wrlib: add detection for ImageMagick using pkg-config