Restore ability to trap crtl+c

See issue #330. Reverts pull request #302 to fix the regression.