added support for older browsers that doesn't support "addEventListener" (thanks, @justinkempton)