unix/windows: Make sure that process exit code is portable 8-bit value.

This fixes FORCED_EXIT internal flag leaking into Windows exit code.