Poland agrees to station German troops in its territory