autotools: don't use AC_FUNC_MALLOC

This autoconf test only checks if malloc(0) returns a valid pointer.