joe: fix build on darwin Adding guards for apple
Manual migration for the sake of by-name migration is no longer discouraged since #340235.