Fix for Sailfish update9 and QT5.2

Fixes #23 and includes PR #24 

Also fixes the in #24 described segfault.