BUILD: stats: conditionally mark obsolete stats states as deprecated

The obsolete stats states STAT_ST_* were marked as deprecated with recent
commit 6ef1648dc ("CLEANUP: stats: rename the stats state values an mark
the old ones deprecated"), except that this feature requires gcc 6 and
above. Let's use the macro that depends on this condition instead.

The issue appeared on 2.6-dev9 so no backport is needed.
diff --git a/include/haproxy/stats-t.h b/include/haproxy/stats-t.h
index 61c756a..efa0ac3 100644
--- a/include/haproxy/stats-t.h
+++ b/include/haproxy/stats-t.h
@@ -135,12 +135,12 @@
  * please do not use these values anymore and defined your own!
  */
 enum obsolete_stat_state {
-	STAT_ST_INIT __attribute__((deprecated)) = 0,
-	STAT_ST_HEAD __attribute__((deprecated)),
-	STAT_ST_INFO __attribute__((deprecated)),
-	STAT_ST_LIST __attribute__((deprecated)),
-	STAT_ST_END  __attribute__((deprecated)),
-	STAT_ST_FIN  __attribute__((deprecated)),
+	STAT_ST_INIT ENUM_ATTRIBUTE((deprecated)) = 0,
+	STAT_ST_HEAD ENUM_ATTRIBUTE((deprecated)),
+	STAT_ST_INFO ENUM_ATTRIBUTE((deprecated)),
+	STAT_ST_LIST ENUM_ATTRIBUTE((deprecated)),
+	STAT_ST_END  ENUM_ATTRIBUTE((deprecated)),
+	STAT_ST_FIN  ENUM_ATTRIBUTE((deprecated)),
 };
 
 /* data transmission states for the stats responses inside a proxy */