Fix cross-compiling issue by removing AC_FUNC_MALLOC