Fix silently crashing Python/IPython on Cygwin

Upstream: http://www.cygwin.com/ml/cygwin-apps/2014-04/msg00057.html