Use of non-smooth impacts for the control of (otherwise) uncontrollable linear mechanical systems