Trap enumerable and non-enumerable properties of window when possible

This patch fixes #3 in Opera 12 and higher.