fix up compilation on OSX