fix some compiler warnings on Mac OS