Revert "Do not link to libatomic on macOS"
This reverts commit dbe8be703a18aa858b4739d0b0537f60cac1c629.