Fix proper win32 checks and use of inline for setsockopt. Reported by Bruno Haible <bruno@clisp.org>.