Fixes for static builds.