IE lt 9 compatibility

'hasOwnProperty' method is not supported on host objects in Internet Explorer 8 and below.

It's a bit ugly, but a small compromise for browser support.
Merge pull request #138 from tanenbaum/patch-1

IE lt 9 compatibility