D∗ production in jets at the CERN SPS collider