new defineIfNotDefined() utility function
use defineIfNotDefined() for some constants

TAGNAME_REGEXP AUTOTAGNAME_REGEXP constants can be defined before.