Adds utility for fixing CTRL-C on Windows.

This is a squashed version of pull request #555.