Fixed rand(), srand() compatibility issues for people porting to Windows