bindings: fix handling of long return values from callback