Clean up kwstat to support windows machines without cstdint.