add compatibility function for run-hook-wrapped

This function was introduced in Emacs 24.1
Provide a lisp equivalent.

Tested on Emacs 23.4: allows magit-topgit.el to be used normally

This fixes #1211