A pragmatic analysis of spontaneous imitations