Change const to var and enable 'use strict'; in all files

Fixes #42