fix incorrect usage of HAVE_SYS_TYPES_H instead of HAVE_SYS_SOCKET_H for sys/socket.h inclusion