Add missing variables from predict.h

Removal of predict.h removed some variable definitions that are still
needed. Add them back.
Switch to cmake

Remove the old ad-hoc build system and replace it with a basic cmake
script.