Minor exit() changes.

These are just for portability.
There is an unusual exit(-1) in gstat/gstat.c that I haven't replaced, it should be checked and probably changed to exit(EXIT_FAILURE) though.