libgcrypt-1.5's configure script incorrectly detects x86_64-apple-darwin (macOS) as an ELF platform. This causes failures when compiling assembly sources. Backport libgcrypt's fix for this issue, fixing libgcrypt-1.5's build on macOS.