Disorder and spectral line shapes in two-level systems