fix static build with python plugin enabled