Photoionization and photoabsorption cross sections of O, N2, O2, and N for aeronomic calculations