On some systems, such as Android, threads are not provided via `-lpthread`. CMake comes with a built-in module for finding the correct threads library. Use it to fix the linking issue on Android and possibly other systems.