Fixed compilation errors on UNIX