gsocket: fix compilation when ENOTSOCK and WSANOTSOCK are both defined