Monkey patch for currying in javascript.