Fix archive writer

1. align to even address
2. Fix the use of GElf_Ehdr and Elf32_Ehdr