Compile fixes for release, wchar_t use in crash handler