Add extern to *_main global variable declarations in header files.