Fix bugs for old compile option (not C++ 11).