Karstens throws 3 shutout innings for Pirates