cmake: correctly forward user-provided flags to try_compile()

Poppler overrides the user-provided CMAKE_{C,CXX}_FLAGS and appends them
to the per-configuration variables instead. This behaviour currently
causes cross-compilation checks to fail since a CMake issue means these
these per-configuration flags are no passed to try_compile() commands.
In my case the flags specified in the toolchain file (as part of
CMAKE_{C,CXX}_FLAGS_INIT) are absolutely required to compile successfully
since a missing `-mabi=/-march=` flag will result in a linker error due to
trying to link incompatible libraries. If CMAKE_TRY_COMPILE_CONFIGURATION
is empty CMake will no propagate the per-configuration flags to
try_compile() so we have to to set the value explicitly.

This is an upstream CMake issue:
See https://gitlab.kitware.com/cmake/cmake/-/issues/22414 and
https://gitlab.kitware.com/cmake/cmake/-/issues/19512.
7 jobs for fix-crosscompilation in 5 minutes and 30 seconds (queued for 4 seconds)
latest
Status Job ID Name Coverage
  Build
passed #11775349
build

00:03:50

passed #11775354
build_android

00:00:46

passed #11775350
build_clang12_libcpp

00:05:30

passed #11775353
build_clazy_clang12

00:04:36

passed #11775352
build_mingw64_fedora33

00:04:52

passed #11775351
build_ubuntu_18_04

00:02:32

passed #11775348
clang_format

00:01:07