Harlequins boss Conor O'Shea admitted his side "got away with it" after Tom Casson's last-gasp try earned them a 31-28 victory at London Irish.