Make name argument to document.register case insensitive