Fix method to get space above the dropdown

It's better to get the scrollTop value from window rather than body
to update enoughRoomAbove variable. This method is supported by
the main browsers.
Merge pull request #2200 from diogotrentini/master

Fix bug related to dropdown position in Firefox and IE