minor fix: rand() function for WIN platforms