A lower semicontinuity result for a free discontinuity functional with a boundary term