remove redundant typedef and reorder includes in codegen.cpp

Note that extern “C” is not required for julia.h as it is already used
inside the header