ginac: fix compilation with libc++

Fixes #26030.