use ldd and Config to determine libc in places where ldd is available