[cmake] link necessary lib for std::filesystem
Summary:
This is needed for the backport of core#20744
Depends on D13735
Test Plan:
ninja all check-all
CI builds
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D12017