fix a bug in is_elf()