Contribution of forbidden orbits in the photoabsorption spectra of atoms and molecules in a magnetic field