Fix compile error running javascript tests due to recent api change.