ImDy: Human Inverse Dynamics from Imitated Observations