Replace IntConvertible with FromPrimitive.
Fix build for Rust master.