Static scope analysis and transpilation of ES6 block scoped const and let variables to ES3 vars