Add back portability shims for using the bundled libelf under static compilation.
Add back portability shims for using the bundled libelf under static
compilation.

Open343/pkg,junovitch/pkg,en90/pkg,skoef/pkg,khorben/pkg,khorben/pkg,skoef/pkg,khorben/pkg,junovitch/pkg,en90/pkg,Open343/pkg