COUCHDB-1699: configure: C++ compiler detection improvement

- amended patch to resolve detection failures on Windows, OSX, and gentoo