Preston North End's Liam Lindsay scored a late winner at Ewood Park in the Lancashire derby against Blackburn Rovers.