Add quadratic size encoding patch for CBMC

Based on trunk r2766