fix external declarations for ANSI C