Fixed build errors from GCC 4.6.

GCC 4.6 doesn't have std::map<K, V>::emplace() function. Wow.