Update wrapper generation.
Fix #372.