Make extension build on 3.x

Also removed 2.6 from test list because we don't support 2.6
Fix memory leak