fixed issue #13

The inherited properties like 'constructor' can be ignored by using obj.hasOwnProperty().