Fixed compile error under certain configurations
A previous commit caused an compile error if the option USE_MODELTEST is set but set to "OFF" in CMake.
Improves 37ea0cb9fd3aa0f6521b8e745c2c3ab288241e91