improve flags for shared libraries on linux.