Pienaar seals dramatic win for Ulster