simplyfy win32 specific code

by unicode casting to std::wstring directly instead of using a
utf16::string temporary.