Adapt compilation for modern 64-bit GCC.
Fix loader libelf include.