printf: fix up dodgy use of #if HAVE_FOO and #if !HAVE_FOO