unarr: fix and use non-Win32 conversion routines