Energy spectra of neutrons emitted following muon capture in 16O and 12C