tools: parse pre-release node.js version numbers

`node` binaries built from upstream git have a "-pre" suffix attached
to the version number.  Fix the version parser to handle those.