VUV optical-absorption and electron-energy-loss spectroscopy of formamide