Port over equality spec from node-semver