Main window: fix support of old gtk versions

Signed-off-by: Jerome Flesch <jflesch@gmail.com>