build: improve detection of eBPF support
Summary:
Just checking for the `sys/sdt.h` header isn't enough, as systems like macOS have the header, but it doesn't actually have the dtrace probes, which leads to compile failures.
Backport of core#22238.
Test Plan:
cmake -GNinja .. -DENABLE_TRACING=ON ninja
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D12636