Fix scope availability of patch function
Fix scope availability of patch function

Before, with patch as an attribute of h, patch was not
available to be called recursively. Fixed that, and also use
module.exports rather than es6 module export syntax, to make
it independent of babel-use

picodom/picodom,picodom/picodom