HTC counterattacks Apple in smartphone patent battle