A variation perturbation calculation of pseudostates and polarizabilities for CO and NO