Makefile.am: copy a couple of fixes from luaposix.