fix for jquery / zepto compatibility
more fixes for jQuery / Zepto use