Unsupervised learning of observation functions in state-space models by nonparametric moment methods