Fix ELF detection