Philander takes six as South Africa beat India in first test