Positronium formation cross sections in He and H2 at intermediate energies.