Use parameters to track whether we are doing a static link. Fix up