Compile static libraries with -fPIC and enable shared libraries by default

@paulfitz is there a reason why we don't do this already?