Miscellaneous changes

A fistful of minor patches to let `sile` work on my system. The last one (luaexpat 1.3.0 compatibility) is quite surprising because without it I am unable to do anything.

Pick up what you want.