Fix nasty crash that only happens when using cygwin.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>