In the past, GoogleTest could not set this flag unconditionally as it
would break CUDA on CMake versions older than 3.13. As the project now
requires at least CMake 3.16, it's safe to enable and finally prefer
-pthread to -lpthread.
This does not make any difference on systems with glibc 2.34 as newer,
as libpthread is part of libc now.
Properly fixes#2482