Made nodejs version checking more robust