Beam quality characterization of laser pulses by Z-scan techniques