Fixed compilation and warnings on Linux systems.