Move a local function declaration to namespace scope for clang-macos