Fix compilation errors in examples related to num traits