Add workaround for older versions of lit.

Some users rely on the version of lit provided by pypi.
See http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20200511/780899.html
diff --git a/litsupport/test.py b/litsupport/test.py
index 86ca6c6..91b435a 100644
--- a/litsupport/test.py
+++ b/litsupport/test.py
@@ -14,10 +14,15 @@
 
 
 NOCHANGE = lit.Test.ResultCode('NOCHANGE', False)
-lit.main.add_result_category(NOCHANGE, "Executable Unchanged")
-
 NOEXE = lit.Test.ResultCode('NOEXE', True)
-lit.main.add_result_category(NOEXE, "Executable Missing")
+
+# add_result_category has been added recently to lit. Lit will crash if it encounters a result code that has not been registered.
+# However, some users rely on the lit version provided by pypi that does not require or have add_result_category.
+# See for more details: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20200511/780899.html
+if lit.main.add_result_category:
+    lit.main.add_result_category(NOEXE, "Executable Missing")
+    lit.main.add_result_category(NOCHANGE, "Executable Unchanged")
+
 
 class TestSuiteTest(lit.formats.ShTest):
     def __init__(self):