JS: Fixes for compareTo().
JS: Fixes for compareTo().

ripple/ripple-lib,ripple/ripple-lib,wilsonianb/ripple-lib,darkdarkdragon/ripple-lib,ripple/ripple-lib,ripple/ripple-lib,darkdarkdragon/ripple-lib,wilsonianb/ripple-lib,darkdarkdragon/ripple-lib,wilsonianb/ripple-lib