Children who daydream fall behind at school, study says