cast setsocktopt and getsockopt calls to fix windows build