Numerous fixes to get back to working in zf 2.1