fix commit error on non-ansi Windows and OSX.

It works well on Windows 7 sp1 kr, OS X 10.8.3 kr