Islamist motive possible in German train knife attack: prosecutors