Fix function coercion with latest Rust

Closes #52