State, industry agree to mercury compromise