Fixed Object.freeze() and friends according to the specification.

This fixes #340 and also closes #374 issues on Github.
2 files changed