How did the economies of the North and South differ before the Civil War?