gh-35094: To determine GAP_SO sage.env looks for libgap.so but it should look for libgap.so*
### 📚 Description
In short, sometimes there is no `lib**.so` available, but only
`lib**.so.*`. This breaks GAP and Singular related things.
See #33446 for details.
Closes #33446
### ⌛ Dependencies
Depends on #35093 #34391 (GAP update to 4.12.2)
URL: https://github.com/sagemath/sage/pull/35094
Reported by: Dima Pasechnik
Reviewer(s): Matthias Köppe
Committer
Release Manager