Add a bunch of compiler conditionals to publish build mode. These must have dissapeared some time ago eh...