Core/Dependencies: Fix an issue with CMake not being able to determine the language when linking gsoap
Closes #9704