Update base.js

Fix for EE 2.8+
Merge pull request #7 from unleadedgroup/master

Update base.js to resolve EE2.8+ issues.