Set a console Ctrl handler for Windows