It seems to be an issue with the headers coming back from Salesforce. The is-processed header is not in the response when the lead was processed correctly. It only is available when there was an error (for example when leaving out the organisation id).
So a quick fix might be (on line 414), to change:
if ($result['headers']['is-processed'] == "true")
Into
if (!isset($result['headers']['is-processed']) && $result['response']['code'] == 200)