Enabled strict mode

Also fixed a warning about referencing an undefined variable.

Fixes #50.