Fixed smallwm.cpp to compile under the rewrite.

Note that the actual binary has not actually been built yet, so there
will probably be minor fixes after this commit.