[introspection] Fix g-ir-scanner syntax errors

Fixes https://github.com/harfbuzz/harfbuzz/issues/2851
diff --git a/src/hb-unicode.h b/src/hb-unicode.h
index f1f8573..c04ee15 100644
--- a/src/hb-unicode.h
+++ b/src/hb-unicode.h
@@ -28,7 +28,7 @@
  * Google Author(s): Behdad Esfahbod
  */
 
-#ifndef HB_H_IN
+#if !defined(HB_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
 #error "Include <hb.h> instead."
 #endif