(merge from 3.5) Issue #27453: CPP invocation in configure must use CPPFLAGS.
Patch by Chi Hsuan Yen.