Fix compilation on Arch Linux (1/2)

libelf related fixes:
- Make sure system libelf doesn't conflict/can find legacy libelf
- "No such thing as Elf32_XWord" (libelf)
-- System libelf defines both Elf32_XWord and Elf64_Xword as uint64 as well
Fix compilation on Arch (2/2): Do not link flex
Use -rpath for (likely non-standard) libelf location