[build] Allow --with-gc=malloc.

This isn't a documented option as it is just for compiler hacking
like using valgrind to check for memory errors.