net: fix socket memcg build with !CONFIG_NET