Add -std=c99 if accepted by the compiler.

Some versions of glibc seem to need this in order to define INFINITY
and similar constants.