fixed linkmode for "both" configuration builds