Fix link error when testing is enabled

The Qt5::Test is an exported target in modern CMake, so we must ensure
that Qt5Test is now found before linking in order to avoid a link error.