Electron-diffraction studies of thin layers of solidified CO and N2O