Fixes both 'type' is null and 'regexCache' is null 

Hello!

This pull requests fixes two issues for MSIE8 (and possibly others):

* *'type' is null or not an object* - Issue #9 
* *'regexCache' is null or not an object* - this seem to be specific MSIE8 behaviour (it does not allow clojure var declaration between function bodies???)