Fix function.length for async functions.