Fix build warnings/errors on x86(-64) systems