Fix function coercion with latest Rust

Closes #52
Merge pull request #53 from tomassedovic/fix-52

Fix function coercion with latest Rust