[js] support Function.bind with any number of arguments