merge revision(s) 39814,39815: [Backport #8117]

	* configure.in: Fix c++ compiler auto-selection not only for
	  Darwin 11.x, but also the other versions of Darwin.

	* configure.in: set ac_cv_prog_cxx if CXX is supplied.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@40314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e