include/compat.h: fix musl build and include inttypes.h.