Appeals court says state can require sonograms prior to abortion