A noninvasive bunch length monitor for femtosecond electron bunches