fix varargs signature generation, '...' is optional and both cases must be handled; fixes #1918