Added option to extend swig