BRICS countries vow to fight terrorism, corruption