Move platform checks from headers to the implementations using them.