fix #313 handling of style object in setAttributes

switch from setting node.style[rule] to node.setAttribute("style", rules)