Use more system libraries which the shipped 3rdparty modules can use. This avoids the x86_64-musl internal compiler error reported in #2858