Source: Red Sox, John Maine agree to deal