resolved some IE compatibility issues

the console and its log function are unreliably defined in IE. always
detect for them before using them.