Smoking's effects on the immune system can last years, study