Also handle -std=gnu++... as C++
(cherry picked from commit ffd253c4688d121d04b939c443bab7ec52e0be8d)