Changed calculation of r2 in calc_zns in pop_ld.cpp