fix compiler warnings on Mac OS X