[node plugin] Guard against redefined module variable

Closes #137
Fix test failures introduced by d4c72638d4dc3c37faff980b5cf1081dba8a7433