core: ensure getsockopt/setsockopt use the proper pointer size on Windows