Fix C++ linker error (ugh, extern)