Raptors pull away late for 117-104 win over Magic-media-3