Fix memory exhaustion error for tests

The last KDF test causes a large amount of memory to be used, sometimes resulting in a fatal error. This sets the memory limit properly.