Make some platform-specific header checks conditional.