Compatible with homebrew-installed libelf

see the code