implement document.getElementsByClassName when passed a single class