Update static.js

Fix to work with NodeJS 10.x or later.