fix call to require() even when included using html script tag