removed grep on HAVE_MAGIC