Calculation of temporal spreading of ultrashort pulses propagating through optical glasses