Fix proper win32 checks and use of inline for setsockopt.