Don't compile udp stuff in socket layer if UDP is not enabled.