Avoid Object.defineProperty errors in old Android

The browser in older android versions throws an exception when
Object.defineProperty is used on DOM Objects.  According to caniuse.com,
the Page Visibility is not available in those versions, so protect uses of
DefineProperty in that branch.

Fixes #1