Apply patch https://github.com/zendframework/zf1/pull/364