Leinster sneak into PRO12 final