On the realization of constraints in nonholonomic mechanics