Stabilization of simple mechanical systems subject to inequality constraints