Add timeout option for LibreOffice and GM.