Handle e_phnum correctly in the ELF loader.

If it equals PN_XNUM (0xFFFF) we need to seek to the first section
header and read its sh_info field as the actual e_phnum value.