In-beam γ-ray spectroscopy of 240U using the (18O, 16O) reaction