Merge pull request #10886 from OatmealDome/metal-minor-fixes Metal: Prevent usage of macOS-only APIs on non-macOS platforms