Add ABI detection for Gentoo

Add ABI detection for Gentoo Linux.