Define lastRequest as local variable instead of global

Fixes an exception that gets raised in newer browsers
Merge pull request #61 from SchoolKeep/fix-missing-var

Define lastRequest as local variable instead of global