The photochemistry of biogenic gases in the early and present atmosphere