fix compilation on OS X