Computing independent sets in graphs with large girth