add missing files for compilation independent of Civ5 SDK; add median method for global happiness threshold computation (with logging)