add "extern "C"" to generator helper files