PHP does not add its include paths to CFLAGS at this point, we need to do that explicitly and then restore the original value after all our checks