Another attempt to fix CMake Python detection on USE_PYTHON3 status changes
This MR fixes another issue in the
USE_PYTHON3 detection logic, since the
PYTHON_LIBRARIES variable inside
FindPythonLibsNew is not cached and is unset on multiple configurations. This currently prevents builds on macOS using Python, since neither MacPorts nor Homebrew explicitly link
libboost_python against the Python libraries.