Ah, I see. It seems Polylang doesn't like it very much when other plugins use WPML APIs directly instead of theirs. I'll see what I can do.
Edit: yep, it's because of Polylang. When only WPML is installed the plugin works fine (just tested locally), but Polylang messes with it somehow.
The good people of Polylang say that the way plugins detect WPML (including WPP) is wrong - even if the people at WPML forums say it's OK to do it that way.