EINVAL from setsockopt() on OSX is ignored

This is an OSX bug: If the peer have disconnected, setsockopt()
returns EINVAL. This patch ignores the error and assumes that the
next send/recv operation on the socket will fail and cause the
cleanup to happen.

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>