fix check if neededLibsToReplace is empty, check explicitly for elf.h