Reordered some #include directives, to put "compat.h" first