Fixed compile issues without C++11