configure: fix gcc detection for v2.95