Fix porting inconsistency about rounding to even.