Portability fixes

Concentrate compiler dependencies to compiler.h; make sure compiler.h
is included first in every .c file (since some prototypes may depend
on the presence of feature request macros.)

Actually use the conditional inclusion of various functions (totally
broken in previous releases.)
diff --git a/lib/snprintf.c b/lib/snprintf.c
index f56a492..de4d96d 100644
--- a/lib/snprintf.c
+++ b/lib/snprintf.c
@@ -4,6 +4,8 @@
  * Implement snprintf() in terms of vsnprintf()
  */
 
+#include "compiler.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>