fix for browsers without getElementsByClassName support