fix #1021 getElementsByClassName discrepancy in Fx 3.6

Modern browsers, and IE7+ coerce the class parameter to a string
automatically, it was not the case in Firefox 3.6.