use hasOwnProperty in for in loops

fixes #450
1.4.0-beta5