Surfer punches shark to stave off attack