[build] Make lxml module optional

It is much faster than xml.etree.ElementTree, but we can do without, so
use it only if it is present.