Add workaround for taking care of different libnames on linking and runtime.