IE8: Hashchange event is not working with Bean

Bean does not seem to support hashchange for IE8 properly. This
commit fixes this behavior by utilizing attachEvent for IE8.