Improve getting of default naming for static and shared libraries