Fix Cygwin crashing on quit

Not sure why this was making Cygwin crash and nobody else, but here's the fix for it.