build: Use AC_CHECK_DECLS/check_symbol_exists for getentropy This assumes that getentropy is declared in sys/random.h. Should fix issues on iOS. See #774.