Move workarounds for health-API changes to a utility.