COMP: fix compile errors on Mac