Restart unsafe syscalls on EINTR. Fixes #59.