Declare global variables with defvar

Global variables should be declared. Using not declared variables
causes byte compile warnings.