Arrange header buttons based on os.

Fixes #487.
Fixes #353.
Arrange header buttons (minimize, maximize, close + fullscreen) based on the running os.