Allow gcc 4.7 to compile.

std::map emplace is faster, but it's not available on all of the gcc
versions that we do support.