vim, macvim: fix and test python linking.

Closes #32056.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>