add optional console reporter
fix test case on more browsers by using a more cross-browser API #383