patch 8.0.0719: build failure without +terminal feature

Problem:    Build failure without +terminal feature.
Solution:   Add #ifdefs.
diff --git a/src/channel.c b/src/channel.c
index 9ba013a..939b513 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -2657,9 +2657,11 @@
 		msg = json_encode(listtv, ch_mode);
 	    if (msg != NULL)
 	    {
+#ifdef FEAT_TERMINAL
 		if (buffer->b_term != NULL)
 		    write_to_term(buffer, msg, channel);
 		else
+#endif
 		    append_to_buffer(buffer, msg, channel, part);
 	    }
 	}