#3818: enable memory dumps on demand