Replace constants.h with buildsystem defines