Added missing memory allocation checks in libspeexdsp.