Fix for Mavericks (and other systems using libc++).

On Mavericks and other systems using libc++, only C++11
support is provided. Some things, including the hash
class, are moved from the tr1 namespace to std.

This patch is adapted from
[homebrew pull 23867](https://github.com/mxcl/homebrew/pull/23867).