socket: Fix compiling on Windows.

While setsockopt worked with uint8_t* instead of char*, looks like the
Windows version isn't as permissive.