Dow Chemical’s second-quarter profit and sales exceeded expectations