Support mmapping files whose length is not divisible by pgsize