small compatibility fix for prototype.js