Holographic formula for the determinant of the scattering operator in thermal AdS