Support automake 1.12 & 1.13
Fix some flickering that can occur when a menu is shown

Fixes Xamarin bug 10021