Use a static stack buffer for Windows.
Throw if GetModuleFileNameW fails.