Analytical Expression of Z-scan Curves in Refractive and Absorptive Nonlocal Thin Media