Correctly check for undefined in getScroll. Fixes #219