Define the console functions as empty functions if they are undefined, t...

...o make the code run on IE and WP7