Weak link effects in the surface impedance of cuprate superconductors