Fix *nix compilation and warning