Better srand initialization