Improved removeLeadingZeroes
Use scala.compat.Platform instead of System