This involved breaking things up into more segments in debug mode, since the code is larger. I also had to remove some unused extern definitions, which were causing link errors when debug code was enabled.
To enable debug code, pass "DEBUG=1" to make or build.gs.