#473415 disabling building shared libraries shouldn't have as effect that all libraries should get linked.