build: Skip compiling network.h and rtsp.h if networking is not enabled.