Fix build with Boost 1.77.0
Summary:
BOOST_FILESYSTEM_C_STR changed to accept the path as an argument
This is a backport of core#22713
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D10769