IE8 support: use attachEvent to attach click handler

This is all it took to make perfBar work in IE8.