Fixes for the window bar and middle click on new window.

Submitted by:	tomek@apostata.org
Fix build with GCC 4.8, which is pulled in by USES=compiler on FreeBSD < 10.