Nicotine may ward off memory loss