Use pkgconfig so that Matplotlib links correctly