No need to set obj to NULL it will be set automatically later, this fix a gcc 47 warning
Fix warning from gcc 4.7
Remove unused variable
Autodetect if bundled libelf is necessary