Add macro checking to support ARM/AArch64

Add macro checks to define __elf64 and __elf32 on 32-bit and 64-bit ARM compilers.