fix RemoteFunctions to make it work on IE

node.remove() is not supported on IE, using alternative
node.parentNode.removeChild(node) in that case