Add ABI detection for Gentoo