stat: do positioned read for shared memory size.

This means we don't need to do a double mmap() and also means we can
handle an incomplete set up shared memory area.