Try to determine whether to use /lib64 /lib32 libdir
More fixes to libdir detection