imake: Patch to work with superenv

Perhaps this helps for #15687.

The two configure tests for `cpp` are kind of obsolete for `clang -E`, which is what we use in superenv.