Passive stabilization technique applied to continuous-wave picosecond mode-locked Yb:YAG and Nd:BaY2F8 lasers