Accreting pre-main-sequence models and abundance anomalies in globular clusters