Simplify SLIBNAME_WITH_VERSION and SLIBNAME_WITH_MAJOR.