It's not racist. Before the word "Coons" was used as a derogatory remark for black people the word "coon" was short for raccoon. As in Davey Crockett's signature coon/raccoon hat. It wasn't until later in history that racist people would associate black people with being like wily raccoons. In the song, however Jim is clearly referencing Davey's famous coon hat.