auhal: fix a couple of memory leaks
macosx: fix utf8 issue