Red Sox sign Dempster to 2-year deal