The libtorch CMake files are in the `dev` output and used relative paths to locate the shared libraries. This fails, because the libraries are in the `out` output. This change patches the CMake files to use library paths from `out`. See #102146.