Fixed compilation on OS X