Require -D_REENTRANT flag for both CFLAGS and CPPFLAGS if building under...

... Solaris

Port of open-mpi/ompi@64c1868

@ggouaillardet  please review