Fix build breakage introduced by cfe9285

Commit cfe9285adf391ab66faeb5def811fe08e47a221a broke the build in multiple ways. These patches fix the issues.

Note, however, than even with these patches, building with `--disable-legacy-protocol` doesn't work:

    make[2]: *** No rule to make target 'nolegacy/crypto.c', needed by 'nolegacy/crypto.o'.  Stop.

I believe @gsliepen forgot to include these files in his commit.