Fix format string generation
Include messages.h for macro form_str in select extensions