NBA: Raptors set record with last-gasp win over Pacers