Fixing the global stack -- and an overflow in collapse_mask
diff --git a/libcelt/modes.c b/libcelt/modes.c
index ddb5071..259a49b 100644
--- a/libcelt/modes.c
+++ b/libcelt/modes.c
@@ -286,11 +286,13 @@
       scanf("%d ", band_allocation+i);
    }
 #endif
+#ifdef CUSTOM_MODES
    ALLOC_STACK;
 #if !defined(VAR_ARRAYS) && !defined(USE_ALLOCA)
    if (global_stack==NULL)
       goto failure;
 #endif 
+#endif
 
 #ifndef CUSTOM_MODES_ONLY
    for (i=0;i<TOTAL_MODES;i++)