Restore custom FindPythonLibs.cmake with improvements to fix MSYS2 bug.