changes to fix compilation under maemo5 - provided by Darren Long