γ-ray spectroscopy of neutron-rich S40