fix function types with rest parameters
basic name mangling, doesn't work in all cases yet