Use 'sig_atomic_t' when appropriate

Fixes #51.