On the effects of dynamical evolution on the initial mass function of globular clusters