python: Fix with-brewed-tk for tcl-tk

Fixes #18657