Compatibility fixes for older C compilers. Fixed printf format for