Follow up to r1875122: Actually fix (some of?) the crashes in Ruby.
* tools/dev/unix-build/Makefile.svn: Add more fixes I came up with while debugging Ruby crashes. Patches still relevant to current versions of Ruby (we're still on 2.4) have been submitted upstream. Also, re-create the ruby patch properly instead of appending to an existing patch file if already present.