Nonparametric function estimation for long memory time series