[enhancement] Properly support libdirs of explicit bitnesses

Formerly this is limited to `lib64` on 64-bit systems; more configurations
such as Gentoo on MIPS N32 (which uses /usr/lib for the O32 ABI) are
supported now.

This is tested on my Gentoo/AMD64 and Gentoo/MIPS with N32 as default ABI.