Code has been modified to be portable.
Fixes issues like showing 0 MiB when the value is just slightly less then 1 MiB.