fix imagemagick detection on UNIX