Fix compilation on OS X