Tweaks for static building on linux