Use pkg-config --static to pick up deps

Fixes #1912