fix python linking when using static libraries for deps or statically building libmapnik