Fix compiler warnings about format string errors on BSD.