Move only the hook and not the declaration into a Mac only section.