Golden State hung on for a thrilling victory in Toronto, beating the Raptors to tie the series at 1-1.