Improved checking for Ripple emulator in JavaScript