Fixes for rust RFC 369.
Fix OS X build.
Merge pull request #16 from mrmonday/num-fixes

Num fixes