The Toronto Raptors held on in a wild fourth quarter to claim their first NBA championship.