fix getsockopt (with nicer interface too) and fix setsockopt with boolean