Update code to work with new swig version