The dc Josephson effect for proximity systems with magnetic impurities