Fix up Windows cross compile detection and error handling on Darwin.

Change-Id: Iaa0e3aa64340e31c357a60bc774d9a4ec8174f62