network: fix conditional variable declaration