configure.ac: properly store configuration flags in config.h