Fixed setsockopt() failing on some platforms due to sizeof(bool) not being equal to sizeof(int)