Fixed compilation with gcc on OS X