Provide both avifincrtest_helpers{_internal}

Provide both the avifincrtest_helpers and avifincrtest_helpers_internal
OBJECT libraries. This allows us to link avifincrtest with only the avif
library but not with the avif_internal static library. avifincrtest uses
only public API functions of the libavif library, so it does not need to
depend on the avif_internal static library.

Fix https://github.com/AOMediaCodec/libavif/issues/2325.
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index f25f11e..5739276 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -91,7 +91,9 @@
 if(AVIF_ENABLE_GTEST)
     check_avif_option(AVIF_GTEST TARGET GTest::GTest PKG_NAME GTest)
     add_library(avifincrtest_helpers OBJECT gtest/avifincrtest_helpers.cc)
-    target_link_libraries(avifincrtest_helpers avif_internal GTest::GTest)
+    target_link_libraries(avifincrtest_helpers avif GTest::GTest)
+    add_library(avifincrtest_helpers_internal OBJECT gtest/avifincrtest_helpers.cc)
+    target_link_libraries(avifincrtest_helpers_internal avif_internal GTest::GTest)
 endif()
 
 if(AVIF_ENABLE_GTEST)
@@ -115,7 +117,7 @@
     add_avif_gtest_with_data(avifencodetest)
 
     if(AVIF_ENABLE_EXPERIMENTAL_GAIN_MAP)
-        add_avif_internal_gtest_with_data(avifgainmaptest avifincrtest_helpers)
+        add_avif_internal_gtest_with_data(avifgainmaptest avifincrtest_helpers_internal)
 
         if(AVIF_ENABLE_EXPERIMENTAL_JPEG_GAIN_MAP_CONVERSION)
             add_avif_gtest_with_data(avifjpeggainmaptest)