long options parsing fix

Signed-off-by: Denis Zalevskiy <denis.zalevskiy@jollamobile.com>