fix another portability problem for mac