Add fallback atexit implementation using template descrutors

Fixes https://github.com/harfbuzz/harfbuzz/issues/3197
diff --git a/src/hb.hh b/src/hb.hh
index 4ba46ea..7c72179 100644
--- a/src/hb.hh
+++ b/src/hb.hh
@@ -449,7 +449,8 @@
 #  ifdef HAVE_ATEXIT
 #    define hb_atexit atexit
 #  else
-#    error "atexit not found."
+     template <void (*function) (void)> struct hb_atexit_t { ~hb_atexit_t () { function (); } };
+#    define hb_atexit(f) static hb_atexit_t<f> _hb_atexit_##__LINE__;
 #  endif
 #endif