Kaon production in S+nucleus and Pb+Pb collisions at CERN SPS