Long.compare not supported in java 1.6