Implemented hasOwnProperty (issue #2)

Fixes #2.