These are some hastily made, untested changes to get things compiling again, since Ryan is working on a better upgrade patchset in the meantime.