Fix dropdown positioning when close to the right edge of the screen

This patch fixes the issue with dropdown buttons that are too close to the right edge of the screen and its menu becomes half off the screen.

## Before
![Before](http://f.cl.ly/items/2h2H1K3e0O1K1J3W1U3N/Screen%20Shot%202013-03-17%20at%2015.12.36.png)
## After
![After](http://f.cl.ly/items/2x072X2s1l0l3k1C2W1a/Screen%20Shot%202013-03-17%20at%2015.13.01.png)