Use portable format specifiers

This replaces #574, which seemed to have gotten corrupt somehow.