Make sure navigator has non-negative width/height

Older versions of IE throw if we try to assign a negative width/height.

Fixes #24.