superenv: fix versioned g++ invocations.

Closes #24104.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>