The former Yankees All-Star opted out of his deal with the Giants last week