Fix some undeclared global variables

Signed-off-by: Craig Robbins <kde.psych@gmail.com>