Fix two crashes in the ELF parser