A hiker in Alaska was in distress. A webcam used to livestream bears led to his rescue