Fix compatibility with fcgi 0.9.
Fix potential security issue uncovered with -Werror=format-security.