Determination of equilibrium constants for complex species formed from slightly soluble salts