Generalized oscillator strengths for the lowest Π λ Σ transitions in CO and N2