configure: improve detection of wchar_t