Revert "Declare some used variables using defvar"

This reverts commit 38392c08fbf6c923ad7965a9189aeb660a850467.

That fix didn't actually solve anything.