Fix tests to run under older node versions