Simplify check for webkigtk API version

Instead of using our own define, we can simplify our CMakeLists by
using webkitgtk's version macro to check the API. This also makes
it more clear which webkitgtk API version we require.

Reviewed-by: Alexandre Viau <alexandre.viau@savoirfairelinux.com>
Change-Id: Ic65f60fd690d69a13f5c36b7d6e70f03b1894f28
diff --git a/src/webkitchatcontainer.cpp b/src/webkitchatcontainer.cpp
index cd9cf65..e3ee1a8 100644
--- a/src/webkitchatcontainer.cpp
+++ b/src/webkitchatcontainer.cpp
@@ -178,7 +178,7 @@
     return QString(QJsonDocument(message_object).toJson(QJsonDocument::Compact));
 }
 
-#if HAVE_WEBKIT2GTK4
+#if WEBKIT_CHECK_VERSION(2, 6, 0)
 static gboolean
 webview_chat_decide_policy (G_GNUC_UNUSED WebKitWebView *web_view,
                             WebKitPolicyDecision *decision,
@@ -390,7 +390,7 @@
 
     g_signal_connect(priv->webview_chat, "load-changed", G_CALLBACK(webview_chat_load_changed), view);
     g_signal_connect_swapped(priv->webview_chat, "context-menu", G_CALLBACK(webview_chat_context_menu), view);
-#if HAVE_WEBKIT2GTK4
+#if WEBKIT_CHECK_VERSION(2, 6, 0)
     g_signal_connect(priv->webview_chat, "decide-policy", G_CALLBACK(webview_chat_decide_policy), view);
 #endif