Miami tops NC State in final seconds, 79-78