mtp: Do not crash when debugging is turned on

https://bugzilla.gnome.org/show_bug.cgi?id=741346