The S matrix for absorptive Hamiltonians