Replace use of ``\ifthenelse`` from "ifthen.sty" with the
eTeX primitive ``\ifdefined``.
Mark the main language when loading "babel" to prevent a warning
about another language being processed last. This happens when there
is more than one language in the document as we put the main language
also in the document options (for other packages to see).