Study of the length dependence of frequency-doubled light in optical fibers