core: moved `#include`s outside the `extern "C"` guards

moved `#include`s outside the `extern "C"` guards