small compatibility fix for prototype.js
Merge pull request #1804 from cettox/master

small compatibility fix for prototype.js