keep C++ code out of C files and vice-versa by splitting module preamble (original patch by Lars Mans)