A_ITALIC was only added to curses in 2013.

Index: color/ansi.c
--- color/ansi.c.orig
+++ color/ansi.c
@@ -137,7 +137,9 @@ static int ansi_color_parse_single(const char *buf, st
     }
     else if ((buf[pos] == '3') && ansi_is_end_char(buf[pos + 1]))
     {
+#ifdef A_ITALIC
       ansi->attrs |= A_ITALIC;
+#endif
       pos += 2;
     }
     else if (buf[pos] == '3')
@@ -274,9 +276,11 @@ static void ansi_color_list_add(struct AttrColorList *
       case A_BOLD:
         ansi->attr_color = simple_color_get(MT_COLOR_BOLD);
         return;
+#ifdef A_ITALIC
       case A_ITALIC:
         ansi->attr_color = simple_color_get(MT_COLOR_ITALIC);
         return;
+#endif
       case A_UNDERLINE:
         ansi->attr_color = simple_color_get(MT_COLOR_UNDERLINE);
         return;
