[2.0] Use the preprocessor to detect whether hash_map is available.

This changes the legacy detection for hash maps to use the preprocessor macro containing the libstdc++ version instead of guessing using the configure script. This builds successfully on OS X under Clang and LLVM-GCC and Ubuntu Server with GCC.