Fix plFormat for standards-compliant compilers (GCC/Clang)

Also a fix for 64-bit portability discovered on Linux.