fixes to build by Open Watcom toolchain

This contains changes which ensure libarchive be buildable by Open Watcom toolchain.