Fix warnings caused by violation of one-definition-rule when using PCH

This is to be merged together with #1932 -- after the headers have been aggregated to be compiled together, some macros might #define over each other causing warnings. This is harmless because definitions will just supersede each other.