Jackson, Ravens beat 49ers 20-17 to extend win streak to 8