Make sure we include config.h before including twain_i.h.