[bindings] fix python bindings in older swig versions