Addition for compiling on non C++11 compilers

This patch add usage of tinystl/unordered_map and makes compilation possible on compilers not supporting c++11. Also one more define error was there so I fixed that as well. Note that I did not still convert tools to be compiled with tinystl, but this make core part working on gcc 4.6 and older without problem.