Cubs agree to deal with ex-World Series champion slugger