fix compile error occurring with swig3