os_support: include some headers only when needed