wstring fixes for mingw32 and darwin platforms.