Replaced codecvt with Win32 API.

Virtually, ```codecvt``` is supported only by MSVC. So using Win32 API instead of ```codecvt``` will make things simpler.