fix for unconditional use of #include <malloc.h> which doesn't work on OS X

alloca() is defined in stdlib on most *nix systems