api: fix build without CMD_NET support