Tests whether element is visible before checking height - fixes #27

Reduces `pollResize` running time from ~195 ms to ~1 ms.