use only standard c for portability

- builds in gcc with -std=c99 -pedantic
- modrepo.c depends on platform-specific stuff, use some tricks here