Fixed problem in init_photon.c when calling random generator function (that should only happen in main.c)